import { createApp,defineComponent } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './index.css'

// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus)


//引入字体图标
import "@/iconfont/iconfont.css"
import draggable from "vuedraggable";

//自定义组件
import { colorLineConfig, colorLineWidget, colorLineSetting } from "./components/custom-components/color-line"

//注册低代码设计器
import pageDesigner from "@/components/low-code/page-designer/entry/index"
app.use(pageDesigner, {
  custom: [
    {
      config: colorLineConfig,//配置项
      widget: colorLineWidget,//组件
      setting: colorLineSetting,//组件设置
    }
  ]
})

//注册低代码解析器
import pageRender from "@/components/low-code/page-render/entry/index"
app.use(pageRender, {
  custom: [
    {
      config: colorLineConfig,//配置项
      widget: colorLineWidget,//组件
    }
  ]
})

app.component("draggable", draggable)

app.mount('#app')
